//
//  HJNavigationBar.h
//  KaiChat
//
//  Created by lx on 2023/10/17.
//

#import <UIKit/UIKit.h>

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface HJBarButton : UIButton

+ (instancetype)barButtonWithImage:(nullable UIImage *)image target:(nullable id)target action:(nullable SEL)action;
+ (instancetype)barButtonWithTitle:(nullable NSString *)title target:(nullable id)target action:(nullable SEL)action;
+ (instancetype)barButtonWithTitle:(nullable NSString *)title color:(nullable UIColor *)color target:(nullable id)target action:(nullable SEL)action;
+ (instancetype)barButtonWithTitle:(nullable NSString *)title color:(UIColor *)color font:(UIFont *)font target:(nullable id)target action:(nullable SEL)action;
+ (instancetype)barButtonWithImage:(nullable UIImage *)image;

@end


@interface HJBackButton : HJBarButton

- (void)whiteColor;
- (void)blackColor;

@end


@interface HJNavigationBar : UIView

@property (strong, nonatomic, nullable) HJBarButton *leftBarButton;
@property (strong, nonatomic, nullable) HJBarButton *rightBarButton;
@property (strong, nonatomic) NSArray <HJBarButton *>*leftBarButtons;
@property (strong, nonatomic) NSArray <HJBarButton *>*rightBarButtons;
@property (strong, nonatomic) UIView *titleView;
@property (strong, nonatomic) UIView *rightBarView;
@property (strong, nonatomic) UIColor *titleTextColor;
@property (strong, nonatomic) NSDictionary *titleTextAttributes;
@property (strong, nonatomic) UIImage *backgroundImage;
@property (strong, nonatomic) UIColor *barTintColorColor;
@property (strong, nonatomic) UIView *lineView;
@property (strong, nonatomic, readonly) HJBackButton *backBarButton;
@property (strong, nonatomic, readonly) UIView *contentView;
@property (strong, nonatomic, nullable) NSArray <UIColor *>*colors;

@property (assign, nonatomic) BOOL hiddenBackButton;
- (void)setStartPoint:(CGPoint)startPoint endPoint:(CGPoint)endPoint;

@property (assign, nonatomic) BOOL hiddenTitle;

@property (copy, nonatomic) NSString *title;


@end

NS_ASSUME_NONNULL_END

